Przejdź do treści
Logo

kuling.pl

  • Główna
  • Arkdisk
  • Forum
  • Kontakt

Jesteś tutaj

Start » Informatyka » Programowanie » C++

Exceptions

How a C++ compiler implements exception handling

published by Kuling on wt., 2010-11-09 21:02

The C++ standard, like any other feature in C++, doesn't say anything about how exception handling should be implemented. This means that every vendor is free to use any implementation as he sees fit. I will describe how VC++ implements this feature, but it should be a good study material for those as well who use other compilers or Operating Systems [1]. VC++ builds its exception handling support on top of structured exception handling (SEH) provided by Windows operating system [2].

http://www.codeproject.com/kb/cpp/exceptionhandler.aspx

Kategorie: 
C++
Exceptions
  • Czytaj dalej wpis How a C++ compiler implements exception handling
  • Blog
  • 197 odsłon

What Do Exceptions Cost, In Theory?

published by Kuling on wt., 2010-08-10 20:26

http://www.gamearchitect.net/Articles/ExceptionsAndErrorCodes.html

Kategorie: 
C++
Exceptions
Programowanie
  • Czytaj dalej wpis What Do Exceptions Cost, In Theory?
  • Blog
  • 192 odsłony

Decoding the parameters of a thrown C++ exception (0xE06D7363)

published by Kuling on pon., 2010-08-02 15:45

http://blogs.msdn.com/b/oldnewthing/archive/2010/07/30/10044061.aspx

Kategorie: 
C++
Exceptions
  • Czytaj dalej wpis Decoding the parameters of a thrown C++ exception (0xE06D7363)
  • Blog
  • 166 odsłon

Polowanie na święty grall - concurrent collection

published by Kuling on wt., 2009-08-11 20:24

Poluje na pojemnik dający się bezproblemowo używać w programie wielowątkowym. Musi spełniać następujące parametry:

  • template'owy
  • nieblokujące dodawanie, złożoność najwyżej O(logN), najlepiej O(1)
  • nieblokujące kasowanie, złożoność nahwyżej O(n), najlepiej O(1)
  • możliwość iterowania po aktualnym "snapshocie" kolekcji

Czyli coś w rodzaju garbage collector'a z lepszą możliwością iteracji.

Kategorie: 
C++
Concurrency
Exceptions
Programowanie
Templates
  • Czytaj dalej wpis Polowanie na święty grall - concurrent collection
  • Blog
  • 263 odsłony

Concurrency and exceptions

published by Kuling on śr., 2009-06-24 20:50

http://www.bluebytesoftware.com/blog/2009/06/24/ConcurrencyAndExceptions.aspx

Kategorie: 
C++
Concurrency
Exceptions
Programowanie
  • Czytaj dalej wpis Concurrency and exceptions
  • Blog
  • 234 odsłony

Aktualnie czytam - More Exceptional C++ Herb Sutter

published by Kuling on pon., 2009-04-27 19:29

Kategorie: 
C++
Exceptions
Programowanie
Templates
Informatyka
  • Czytaj dalej wpis Aktualnie czytam - More Exceptional C++ Herb Sutter
  • Blog
  • 267 odsłon

try/catch in constructor

published by Kuling on ndz., 2009-04-26 20:48

Morals About Safe Coding

Cytat:
Moral #4: Always perform unmanaged resource acquisition in the constructor body, never in initializer lists. In other words, either use "resource acquisition is initialization" (thereby avoiding unmanaged resources entirely) or else perform the resource acquisition in the constructor body.

Cytat:
Moral #5: Always clean up unmanaged resource acquisition in local try block handlers within the constructor or destructor body, never in constructor or destructor function try block handlers.

Cytat:
Moral #8: Prefer using "resource acquisition is initialization" to manage resources. Really, really, really. It will save you more headaches than you can probably imagine, including hard-to-see ones, similar to some we've already dissected.

More Exceptional C++, Herb Sutter

 

Kategorie: 
C++
Exceptions
Programowanie
  • Czytaj dalej wpis try/catch in constructor
  • Blog
  • 259 odsłon

C++ FAQ Lite - Exceptions and error handling

published by Kuling on sob., 2009-04-25 12:26

http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.11

Kategorie: 
Visual Studio 2003
C++
Visual Studio 2005
Exceptions
Programowanie
Visual Studio 2008
  • Czytaj dalej wpis C++ FAQ Lite - Exceptions and error handling
  • Blog
  • 295 odsłon

Exception safe code in real world

published by Kuling on sob., 2009-04-25 11:49

Below you can find three methods of writing exception safe code in real world. In the order prefered by author:

- Petru's ScopeGuard
- RAII
- try / catch mess
http://www.ddj.com/cpp/184403758

Kategorie: 
Visual Studio 2003
C++
Visual Studio 2005
Exceptions
Programowanie
Visual Studio 2008
Templates
  • Czytaj dalej wpis Exception safe code in real world
  • Blog
  • 268 odsłon

__try/__except - jak złapać EXCEPTION_ACCESS_VIOLATION

published by Kuling on śr., 2009-04-01 21:40

http://msdn.microsoft.com/en-us/library/swezty51(VS.80).aspx

int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep) 
{
   if (code == EXCEPTION_ACCESS_VIOLATION) 
   {
      return EXCEPTION_EXECUTE_HANDLER;
   }
   else 
   {
      return EXCEPTION_CONTINUE_SEARCH;
   };
}

void test()
{
	__try
	{
		*((char *)(NULL)) = 2;
	}
	__except(filter(GetExceptionCode(), GetExceptionInformation()))
	{
		cout << "wicked :)";
	}
}
Kategorie: 
C++
Exceptions
Programowanie
  • Czytaj dalej wpis __try/__except - jak złapać EXCEPTION_ACCESS_VIOLATION
  • Blog
  • 1 odpowiedź
  • 2676 odsłon

Strony

  • 1
  • 2
  • następna ›
  • ostatnia »

Archiwum

  • Styczeń 2012 (7)
  • Grudzień 2011 (2)
  • Listopad 2011 (2)
  • Październik 2011 (2)
  • Wrzesień 2011 (3)
  • Sierpień 2011 (2)
  • Lipiec 2011 (3)
  • Czerwiec 2011 (1)
  • Kwiecień 2011 (4)
  • luty 2011 (1)
  • Styczeń 2011 (2)
  • Listopad 2010 (6)
  • Październik 2010 (5)
  • Sierpień 2010 (10)
  • Lipiec 2010 (3)
  • Czerwiec 2010 (2)
  • Maj 2010 (1)
  • Kwiecień 2010 (2)
  • luty 2010 (4)
  • Styczeń 2010 (5)
  • Grudzień 2009 (5)
  • Listopad 2009 (1)
  • Październik 2009 (4)
  • Wrzesień 2009 (6)
  • Sierpień 2009 (11)
  • Lipiec 2009 (23)
  • Czerwiec 2009 (14)
  • Maj 2009 (23)
  • Kwiecień 2009 (22)
  • Marzec 2009 (14)
  • luty 2009 (20)
  • Styczeń 2009 (14)
  • Grudzień 2008 (17)
  • Listopad 2008 (12)
  • Październik 2008 (10)
  • Wrzesień 2008 (4)
  • Lipiec 2008 (2)
  • Czerwiec 2008 (5)
  • Maj 2008 (5)
  • Kwiecień 2008 (9)
  • Marzec 2008 (9)
  • luty 2008 (30)
  • Styczeń 2008 (22)
  • Grudzień 2007 (15)
  • Listopad 2007 (19)
  • Październik 2007 (10)
  • Wrzesień 2007 (22)
  • Sierpień 2007 (21)
  • Lipiec 2007 (29)
  • Czerwiec 2007 (53)
  • Maj 2007 (61)
  • Kwiecień 2007 (14)
  • Marzec 2007 (5)
  • luty 2007 (4)
  • Styczeń 2007 (16)
  • Grudzień 2006 (69)
  • Listopad 2006 (15)
  • Wrzesień 2006 (25)
  • Sierpień 2006 (20)
  • Lipiec 2006 (10)
  • Czerwiec 2006 (10)
  • Maj 2006 (35)
  • Kwiecień 2006 (5)
  • Marzec 2006 (15)
  • luty 2006 (5)
  • Grudzień 2005 (10)
  • Listopad 2005 (15)
  • Sierpień 2005 (10)
  • Lipiec 2005 (20)
  • Czerwiec 2005 (30)
  • Maj 2005 (30)
  • Kwiecień 2005 (34)
  • Marzec 2005 (14)
  • luty 2005 (10)
  • Grudzień 2004 (30)
  • Listopad 2004 (48)
  • Październik 2004 (25)
  • Sierpień 2004 (18)
  • Lipiec 2004 (30)

Kategorie

  • Angielski (1)
    • FCE (0)
  • Dom (4)
    • Akwarium (3)
    • Kot (2)
  • Gry (11)
    • Counter Strike (8)
  • Informatyka (15)
    • Hardware (15)
      • Mój komputer (14)
    • Linux (0)
    • Programowanie (172)
      • C++ (134)
        • Concurrency (66)
        • Exceptions (14)
        • Templates (21)
      • Narzędzia (10)
        • Visual Studio 2003 (21)
        • Visual Studio 2005 (45)
        • Visual Studio 2008 (33)
        • Visual Studio 2010 (13)
      • PHP (9)
    • Windows (18)
  • Internet (10)
    • Drupal (18)
    • Linki (29)
  • Miejsca (2)
    • Poznań (3)
    • Sieradz (1)
    • Wrocław (12)
    • Zgorzelec (0)
  • Pieniądze (122)
    • Giełda (47)
    • Inwestowanie (66)
    • Mieszkanie (69)
  • Rodzina (14)
    • Magda (1)
  • Rozrywka (66)

Logowanie

  • Utwórz nowe konto
  • Prześlij nowe hasło
Theme provided by Danetsoft under GPL license from Danang Probo Sayekti